﻿<Page x:Class="MenuGridFinal.MapSelector"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:MenuGridFinal"
      mc:Ignorable="d" 

      Title="MapSelector">
    <Page.Background>
        <ImageBrush ImageSource="Images\menuBackGround2.jpg" />
    </Page.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="250"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="70"/>
            <RowDefinition Height="100"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="420"/>
            <ColumnDefinition Width="420"/>
            <ColumnDefinition Width="420"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="100"/>
        </Grid.ColumnDefinitions>

        <Button Name="BackButton" Content="Back" Grid.Column="2" Grid.Row="2" Click="BackButton_Click" Style="{StaticResource mainMenuButton}"/>
        <Button Name="StartButton" Content="Start" Grid.Column="4" Grid.Row="2" Click="StartButton_Click" Style="{StaticResource mainMenuButton}"/>

        <Image Source="{StaticResource BGBitmapImage}" Grid.Column="2" Grid.ColumnSpan="3" Grid.Row="1" Grid.RowSpan="1" Stretch="Fill" Opacity="0.7"/>
        
        <ListView Grid.Column="2" Grid.ColumnSpan="3" Grid.Row="1" Grid.RowSpan="1" Background="Transparent" 
                  ItemsSource="{Binding Maps}"
                  SelectedItem="{Binding Map, Mode=TwoWay}"
                  Name="lvMaps"
                  SelectionChanged="LvMaps_OnSelectionChanged">

            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Map Name" DisplayMemberBinding="{Binding Title}" Width="600"/>
                    <GridViewColumn Header="Author" DisplayMemberBinding="{Binding Author}" Width="300"/>
                    <GridViewColumn Header="Width" DisplayMemberBinding="{Binding Width}" Width="100"/>
                    <GridViewColumn Header="Height" DisplayMemberBinding="{Binding Height}" Width="100"/>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</Page>
